mediator = require 'mediator'
MyFormView = require 'views/base/custom/my_form_view'
template = require 'views/templates/wine_details'


module.exports = class WineDetailsView extends MyFormView
	template: template
	className: 'wine-details'
	id: 'wine-details'
	
	getSaveButtonName: => '.saveWine'
	getDeleteButtonName: => '.deleteWine'

	initialize: ->
		super 

	updateModelFromView: =>
		@model.set({
			name:$('#name').val(),
			grapes:$('#grapes').val(),
			country:$('#country').val(),
			region:$('#region').val(),
			year:$('#year').val(),
			description:$('#description').val()
			});
	